﻿using System;

namespace com.calitha.textcalc.expression
{

    public class PowerExpression : BinaryExpression
    {
        public PowerExpression(Expression left, Expression right)
            : base(left, right)
        {
        }

        public override int Evaluate(int left, int right)
        {
            return (int) Math.Pow(left, right);
        }

        public override double Evaluate(double left, double right)
        {
            return Math.Pow(left, right);
        }

    }
}
